package yagwl.client.model.demo;

import java.util.List;

import yagwl.client.model.ItemDTO;
import yagwl.client.model.TreeNodeDTO;
import yagwl.client.model.fnd.RpcStatus;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("catalog")
public interface CatalogRpcService extends RemoteService {
  // tree management
  TreeNodeDTO getCategoryTree();
  RpcStatus createCategory(TreeNodeDTO category);
  RpcStatus updateCategory(TreeNodeDTO category);
  RpcStatus deleteCategorySubTree(String categoryId);
  RpcStatus addProduct(String catogoryId, String productId);
  RpcStatus removeProduct(String catogoryId, String productId);
  // products management
  List<ItemDTO> getProducts();
  RpcStatus createProduct(ItemDTO product);
  RpcStatus updateProduct(ItemDTO product);
  RpcStatus deleteProduct(String id);
}
